package com.itic.mall.system.project.coupon.service;

import com.itic.appbase.framework.common.service.CrudService;
import com.itic.mall.system.inter.project.coupon.persistence.dao.ProjectCouponDao;
import com.itic.mall.system.inter.project.coupon.persistence.model.ProjectCoupon;
import com.itic.mall.system.inter.project.coupon.persistence.model.ProjectCouponExample;
import com.itic.mall.system.users.usercoupon.service.UsersCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class ProjectCouponService
     extends CrudService<ProjectCouponDao,ProjectCoupon,ProjectCouponExample> {
    @Autowired
    private ProjectCouponDao projectCouponDao;
    @Autowired
    private UsersCouponService usersCouponService;
    
    public ProjectCoupon getExpireTime(String couponId) {
    	ProjectCoupon projectCoupon = this.projectCouponDao.getCouponById(couponId);
    	return projectCoupon;
    }
    
    public List<ProjectCoupon> getAlertSySCoupon(String userId){
    	List<ProjectCoupon> projectCoupons = this.projectCouponDao.getAlertSySCoupon(userId);
    	return projectCoupons;
    }
    
    public List<ProjectCoupon> getRegistCoupon(){
    	return this.projectCouponDao.getRegistCoupon();
    }

}